//
//  ADStaticTableViewModel.h
//  ADKit
//
//  Created by duzexu on 2018/3/29.
//

#import <ADKit/ADKit.h>

@protocol ADStaticTableItemIdentify <NSObject>

- (NSString *)cellReuseIdentify;

@end

@class ADStaticTableItemModel;
@interface ADStaticTableGroupModel : NSObject

/// defalult is CGFLOAT_MIN
@property (nonatomic, assign) CGFloat headerHeight;

/// defalult is 20
@property (nonatomic, assign) CGFloat footerHeight;

@property (nonatomic, strong) NSArray<ADStaticTableItemModel *> *itemModels;

@end

@interface ADStaticTableItemModel : NSObject<ADStaticTableItemIdentify>

/// 图标
@property (nonatomic, copy) NSString *icon;
/// 标题
@property (nonatomic, copy) NSString *title;
/// 详情
@property (nonatomic, copy) NSString *detail;
/// 标题字体颜色
@property (nonatomic, strong) UIColor *textColor;
/// 详情字体颜色
@property (nonatomic, strong) UIColor *detailTextColor;
/// 标题字体
@property (nonatomic, strong) UIFont *titleFont;
/// 详情字体
@property (nonatomic, strong) UIFont *detailFont;
/// 箭头图片
@property (nonatomic, strong) UIImage *indicatorImage;

/// cell背景颜色
@property (nonatomic, strong) UIColor *backgroundColor;

/// default is 44.0f
@property (nonatomic, assign) CGFloat rowHeight;
// default is UITableViewCellSelectionStyleNone.
@property (nonatomic, assign) UITableViewCellSelectionStyle selectionStyle;
// default is UITableViewCellAccessoryDisclosureIndicator
@property (nonatomic, assign)  UITableViewCellAccessoryType accessoryType;

+ (instancetype)itemWithTitle:(NSString *)title detail:(NSString *)detail icon:(NSString *)icon;
+ (instancetype)itemWithTitle:(NSString *)title icon:(NSString *)icon;
+ (instancetype)itemWithTitle:(NSString *)title detail:(NSString *)detail;
+ (instancetype)itemWithTitle:(NSString *)title;

@end

@interface ADStaticTableViewModel : ADTableViewModel

- (void)setStaticTableModels:(NSArray *)models;
- (ADStaticTableItemModel *)itemWithIndexPath:(NSIndexPath*)indexPath;
- (void)reloadWithIndexPath:(NSIndexPath *)indexPath block:(AD_VoidBlock_id)block;

@end
